# Contributor: Thomas Kienlen <kommander@laposte.net>
# Maintainer: Thomas Kienlen <kommander@laposte.net>
pkgname=spotify-player
pkgver=0.16.0
pkgrel=0
pkgdesc="Command driven spotify player"
url="https://github.com/aome510/spotify-player"
arch="x86_64 aarch64 x86 ppc64le" # limited by rust/cargo, does not compile on armv7, armhf
license="MIT"
makedepends="
	alsa-lib-dev
	cargo
	cargo-auditable
	dbus-dev
	openssl-dev
	wayland-dev
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/aome510/spotify-player/archive/v$pkgver.tar.gz"


prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen \
		--no-default-features --features 'alsa-backend,media-control,notify,streaming,daemon'
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/spotify_player -t "$pkgdir"/usr/bin
}

sha512sums="
681d3d9058fb94a4319808048103db78f5ea3944d37b846256411d5f36b77eceb1de5cbc89e990986c9cd0d9900b50c86098103776e1a8f8afc620e4b7d7a19a  spotify-player-0.16.0.tar.gz
"
